package com.cungmua.app.net;

import com.cungmua.app.utils.AppConfig;
import com.cungmua.app.utils.JsonUtils;

import retrofit.RestAdapter;
import retrofit.converter.JacksonConverter;

/**
 * Created by kelvin.nguyen on 6/16/14.
 */
public class CungMuaAPI {
    public static CungMuaService getService() {

        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(AppConfig.getApiEndpoint())
                .setConverter(new JacksonConverter(JsonUtils.defaultMapper()))
                .build();

        CungMuaService service = restAdapter.create(CungMuaService.class);

        return service;
    }
}
